package descentFly.app.tools
{
	import UIFree.ObjectEvent;
	import UIFree.controls.uif_label;
	import UIFree.uif_component;
	import UIFree.uif_ecomponent;
	
	import descentFly.app.df_component;
	import descentFly.app.df_label;
	import descentFly.app.df_panel;
	import descentFly.app.df_progressBar;
	import descentFly.chips.df_chip;
	import descentFly.df_space;
	
	import flash.events.Event;
	import flash.geom.Rectangle;
	
	public class df_chipTool extends df_progressTool
	{
		private var _myChip		: df_chip;
		
		public function df_chipTool(parent:uif_component, awidth: int=0, aheight:int=0) {
			super(parent, awidth, aheight);
		}
		
		override protected function createComponents(layer:df_component, inner:Rectangle):void {
			super.createComponents(layer, inner);
			addEvent(df_space.SETMYCHIP, doSetMyChip, dfApp.space);
		}
		
		private function doSetMyChip(e: ObjectEvent): void {
			setMyChip(e.object as df_chip);
		}
		
		protected function setMyChip(a_chip: df_chip): void {
			_myChip = a_chip;
		}
		
		public function get myChip(): df_chip {
			return _myChip;
		}
	}
}